Digital cameras and other visual input devices use light sensors such as Charge Coupled Devices (CCD) and complementary metal-oxide-semiconductor (CMOS) sensors. These CCD/CMOS light sensors have an array of pixel sensors that an optical image is focused upon. Each pixel sensor may include sub-pixel sensors that sense a different frequency or color of light, such as a Red, Green, and Blue sub-pixel sensor. Alternately, a red and a blue chromatic sensor may be used with a luminosity sensor for YUV pixel coding, or a monochromatic pixel sensor may be used.
FIG. 1 shows a CCD/CMOS light sensor. CCD/CMOS sensor 10 has an array of rows and columns of pixel sensors 12, 14. A lens may be used to focus an image onto the surface of CCD/CMOS sensor 10. However, the periphery of the image may be distorted by the lens or may be blocked by frames or other structures in the camera, or the image may be cropped by the camera to fit a desired size, such as 640×480 pixels, or some other standard size. A frame within the camera may block light to some pixel sensors, such as dark pixel sensors 14, while allowing light from the lens to reach illuminated pixel sensors 12. Both illuminated pixel sensors 12 and dark pixel sensors 14 are identical pixel sensors in the array of CCD/CMOS sensor 10, but the structure of the digital camera casts a shadow onto dark pixel sensors 14 while focusing the image onto illuminated pixel sensors 12. There may also be rows of dark pixel sensors 14 at the top and bottom, but these are not shown.
External clocks SHP, SHD are applied to CCD/CMOS sensor 10 as shift clocks to sample different ones of illuminated pixel sensors 12 and dark pixel sensors 14. As SHP, SHD are pulsed, a next one from illuminated pixel sensors 12 is shifted to the CCDIN output of CCD/CMOS sensor 10. Another clock such as a BLK signal (not shown) can be pulsed as the current pixel moves from one horizontal line to the next line, and a frame signal (not shown) can be pulsed to move to the first pixel on the first line to start sampling of a new frame. A variety of control signals may be substituted by the manufacturer of CCD/CMOS sensor 10.
FIG. 2 is a waveform diagram of operation of the CCD/CMOS sensor. When a new line of pixel sensors in CCD/CMOS sensor 10 is read, the first few pixels read are from dark pixel sensors 14. Then a large number of illuminated pixels are read from illuminated pixel sensors 12, followed by a few dark pixels from dark pixel sensors 14 at the end of the line. Sensing of the beginning of the line is shown in FIG. 2.
Shift pixel clocks SHP, SHD are alternately pulsed low. Non-overlapping clocks CLK1, CLK2 are generated from SHP, SHD. CCD/CMOS sensor 10 outputs a fixed voltage in response to SHP, and then the actual pixel value as a variable voltage in response to SHD. The larger negative voltage output by CCD/CMOS sensor 10 on CCDIN represents a brighter pixel for the color being sensed. Each pixel location on CCD/CMOS sensor 10 can have 3 pixel values successively output on CCDIN, such as for Y, U, and V components of one pixel location.
When dark pixel values are being output by CCD/CMOS sensor 10, Optical Black Pixel (OBP) signal OPB is driven active (low). The OBP signal can be generated by a logic circuit or state machine that also generates SHP, SHD and other control signals. The digital camera designer determines which pixels on CCD/CMOS sensor 10 are shaded by the camera and which pixels the lens is focused on. Further cropping of the image may be performed by the digital camera or by other devices.
Ideally, dark pixel sensors 14 would output a constant, fixed voltage such as zero volts. However, small random offsets in dark pixel sensors 14 and in other circuitry exist, even when no light is reaching dark pixel sensors 14. These offsets are amplified by analog front end (AFE) circuitry at the output of CCD/CMOS sensor 10 and may saturate the output device if the offset is not cancelled correctly.
FIG. 2 shows that the lowest level of CCDIN during the low-going pulses when OBP is active vary somewhat for the 4 black pixels being output. Once OBP is inactive (high), illuminated pixels output much larger low-going pulses on CCDIN. However, pixels within the illuminated region that are darkened, such as for a black portion of the image, may not be accurately represented. Their voltage may be greater or lesser than the voltages of the black pixels from dark pixel sensors 14 during OBP. For example, the last pixel in FIG. 2 has a voltage that is somewhat more negative than some of the four black pixels at the beginning of FIG. 2.
The relative darkness of black pixels in the displayable region of the image may be affected by the offsets and cause visible distortions on the display device, such as on a flat-panel television. Even when CCD/CMOS sensor 10 is covered and receives no light, small offsets within illuminated pixel sensors 12 may create variations in the pixel voltage output, and ultimately on the display device. Saturation may also occur. Thus the black level needs to be controlled in CCD/CMOS sensor 10 since any offsets of dark pixels may be amplified by downstream logic after CCDIN.
The black-level offsets may be corrected either in analog or in digital domains using a feedback method. A large off-chip capacitor is required for filtering and stability concerns, but it increases both the cost and the size and thus is undesirable. The comparison between the target and actual dark level may be done after a Programmable-Gain Amplifier (PGA) that is downstream of CCDIN. The error is fed back to the input of the PGA, and creates a feedback loop that is sensitive to noise when the PGA gain is high. The comparison may also be performed after an Analog-to-Digital Converter (ADC) in the digital domain, after the PGA, but the large off-chip capacitor is still required, and the noise sensitivities are still present when the PGA gain is large at low-illumination conditions. The comparison and filtering can also be done after the ADC in the digital domain, but the PGA and ADC may become saturated easily as the PGA output swings and the ADC input range needs to be enlarged to accommodate the extra signal due to the dark level offset. The enlarged PGA and ADC ranges are expensive and may not be feasible when the supply voltage is limited.
What is desired is an Optical Black Pixel (OBP) cancellation circuit that does not need a large off-chip capacitor. An OBP cancellation circuit is desired that does not need an extended ADC range or extra output swing on the PGA to prevent saturation at low-illumination levels. An OBP cancellation circuit with a fast response time and stability that can be placed at various locations, such as before or after the PGA is desirable.